<?php
declare(strict_types=1);

use Phinx\Migration\AbstractMigration;

final class AddIndexUuidIndexInEntityTable extends AbstractMigration
{
    public function up()
    {
        $this->table('entity')->addIndex(['uuid'], ['name' => 'idx_uuid', 'type' => 'unique'])->save();
    }

    public function down()
    {
        $this->table('entity')->removeIndexByName('idx_uuid')->save();
    }
}
